.class public Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;
.super Ljava/lang/Object;
.source "RemoteSynchronizer.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;,
        Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;,
        Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;,
        Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;
    }
.end annotation


# static fields
.field public static final a:Ljava/lang/String;

.field public static final b:Ljava/lang/String;

.field public static c:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;",
            ">;"
        }
    .end annotation
.end field

.field public static d:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;",
            ">;"
        }
    .end annotation
.end field

.field public static e:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;

.field private static f:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;",
            ">;"
        }
    .end annotation
.end field

.field private static final g:Ljava/lang/Object;

.field private static h:Z

.field private static i:Les/y80;

.field private static j:Z

.field private static k:Z

.field private static l:Ljava/lang/Object;

.field private static m:Ljava/lang/Object;


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v1, Lcom/estrongs/android/pop/a;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, "/synFiles"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->a:Ljava/lang/String;

    .line 2
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v1, Lcom/estrongs/android/pop/a;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, "/synMapFiles"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->b:Ljava/lang/String;

    .line 3
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->c:Ljava/util/Map;

    .line 4
    new-instance v0, Ljava/util/LinkedHashMap;

    invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->d:Ljava/util/Map;

    .line 5
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->f:Ljava/util/HashMap;

    .line 6
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->g:Ljava/lang/Object;

    const/4 v0, 0x0

    .line 7
    sput-boolean v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->h:Z

    .line 8
    new-instance v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$b;

    invoke-direct {v1}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$b;-><init>()V

    sput-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->i:Les/y80;

    .line 9
    sput-boolean v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->j:Z

    .line 10
    sput-boolean v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->k:Z

    .line 11
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->l:Ljava/lang/Object;

    .line 12
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->m:Ljava/lang/Object;

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;)Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;
    .locals 0

    .line 2
    invoke-static {p0, p1}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->b(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;)Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    move-result-object p0

    return-object p0
.end method

.method static synthetic a()Ljava/util/HashMap;
    .locals 1

    .line 1
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->f:Ljava/util/HashMap;

    return-object v0
.end method

.method public static a(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;)V
    .locals 4

    .line 3
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->g:Ljava/lang/Object;

    monitor-enter v0

    .line 4
    :try_start_0
    sget-boolean v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->h:Z

    const/4 v2, 0x1

    if-nez v1, :cond_0

    .line 5
    invoke-static {}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->c()V

    .line 6
    sput-boolean v2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->h:Z

    .line 7
    :cond_0
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 8
    sget-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->f:Ljava/util/HashMap;

    monitor-enter v1

    .line 9
    :try_start_1
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->f:Ljava/util/HashMap;

    iget-object v3, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-virtual {v0, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;

    if-nez v0, :cond_1

    .line 10
    new-instance v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;

    invoke-direct {v0}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;-><init>()V

    .line 11
    sget-object v2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->f:Ljava/util/HashMap;

    iget-object v3, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-virtual {v2, v3, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 12
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->d:Ljava/util/Map;

    iget-object v2, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-interface {v0, v2, p0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 13
    invoke-static {}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->d()V

    goto :goto_0

    .line 14
    :cond_1
    iput-boolean v2, v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;->a:Z

    .line 15
    :goto_0
    sget-object p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->f:Ljava/util/HashMap;

    invoke-virtual {p0}, Ljava/lang/Object;->notify()V

    .line 16
    monitor-exit v1

    return-void

    :catchall_0
    move-exception p0

    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw p0

    :catchall_1
    move-exception p0

    .line 17
    :try_start_2
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    throw p0
.end method

.method public static a(Ljava/lang/String;)V
    .locals 2

    .line 18
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 19
    :try_start_0
    sget-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->e:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;

    if-nez v1, :cond_0

    .line 20
    new-instance v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;

    invoke-direct {v1, p0}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;-><init>(Ljava/lang/String;)V

    sput-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->e:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;

    .line 21
    invoke-virtual {v1}, Lcom/estrongs/android/scanner/service/a;->a()V

    .line 22
    :cond_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p0

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p0
.end method

.method private static b(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;)Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;
    .locals 3

    .line 1
    new-instance v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    invoke-direct {v0, p0, p1}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;-><init>(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$e;)V

    .line 2
    iget-object p0, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-static {p0}, Lcom/estrongs/android/util/h0;->M(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    invoke-static {p0}, Lcom/estrongs/android/util/h0;->m(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    .line 3
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object p1

    const v1, 0x7f110a56

    invoke-virtual {p1, v1}, Landroid/app/Application;->getString(I)Ljava/lang/String;

    move-result-object p1

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    aput-object p0, v1, v2

    invoke-static {p1, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p0

    invoke-virtual {v0, p0}, Les/s80;->a(Ljava/lang/String;)V

    .line 4
    sget-object p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->i:Les/y80;

    invoke-virtual {v0, p0}, Les/s80;->a(Les/y80;)V

    return-object v0
.end method

.method public static b()V
    .locals 3

    .line 5
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->l:Ljava/lang/Object;

    monitor-enter v0

    .line 6
    :try_start_0
    sget-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->c:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->clear()V

    .line 7
    new-instance v1, Ljava/io/File;

    sget-object v2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->b:Ljava/lang/String;

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 8
    new-instance v1, Ljava/io/File;

    sget-object v2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->b:Ljava/lang/String;

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/io/File;->delete()Z

    .line 9
    :cond_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public static c()V
    .locals 1

    .line 1
    new-instance v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$a;

    invoke-direct {v0}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$a;-><init>()V

    invoke-static {v0}, Lcom/estrongs/android/util/o;->a(Ljava/lang/Runnable;)V

    return-void
.end method

.method protected static d()V
    .locals 5

    const/4 v0, 0x0

    .line 1
    :try_start_0
    new-instance v1, Ljava/io/ObjectOutputStream;

    new-instance v2, Ljava/io/FileOutputStream;

    sget-object v3, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->a:Ljava/lang/String;

    invoke-direct {v2, v3}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    invoke-direct {v1, v2}, Ljava/io/ObjectOutputStream;-><init>(Ljava/io/OutputStream;)V
    :try_end_0
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_3
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 2
    :try_start_1
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->d:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    .line 3
    invoke-virtual {v1, v2}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V

    goto :goto_0

    .line 4
    :cond_0
    invoke-virtual {v1}, Ljava/io/ObjectOutputStream;->flush()V
    :try_end_1
    .catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 5
    :goto_1
    :try_start_2
    invoke-virtual {v1}, Ljava/io/ObjectOutputStream;->close()V
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_4

    goto :goto_4

    :catch_0
    move-exception v0

    goto :goto_2

    :catch_1
    move-exception v0

    goto :goto_3

    :catchall_0
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    goto :goto_5

    :catch_2
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    .line 6
    :goto_2
    :try_start_3
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    if-eqz v1, :cond_1

    goto :goto_1

    :catch_3
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    .line 7
    :goto_3
    invoke-virtual {v0}, Ljava/io/FileNotFoundException;->printStackTrace()V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    if-eqz v1, :cond_1

    goto :goto_1

    :catch_4
    :cond_1
    :goto_4
    return-void

    :catchall_1
    move-exception v0

    :goto_5
    if-eqz v1, :cond_2

    .line 8
    :try_start_4
    invoke-virtual {v1}, Ljava/io/ObjectOutputStream;->close()V
    :try_end_4
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_5

    .line 9
    :catch_5
    :cond_2
    goto :goto_7

    :goto_6
    throw v0

    :goto_7
    goto :goto_6
.end method

.method protected static e()V
    .locals 5

    const/4 v0, 0x0

    .line 1
    :try_start_0
    new-instance v1, Ljava/io/ObjectOutputStream;

    new-instance v2, Ljava/io/FileOutputStream;

    sget-object v3, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->b:Ljava/lang/String;

    invoke-direct {v2, v3}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    invoke-direct {v1, v2}, Ljava/io/ObjectOutputStream;-><init>(Ljava/io/OutputStream;)V
    :try_end_0
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_3
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 2
    :try_start_1
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->c:Ljava/util/Map;

    invoke-virtual {v1, v0}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V

    .line 3
    invoke-virtual {v1}, Ljava/io/ObjectOutputStream;->flush()V
    :try_end_1
    .catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 4
    :goto_0
    :try_start_2
    invoke-virtual {v1}, Ljava/io/ObjectOutputStream;->close()V
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_4

    goto :goto_3

    :catch_0
    move-exception v0

    goto :goto_1

    :catch_1
    move-exception v0

    goto :goto_2

    :catchall_0
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    goto :goto_4

    :catch_2
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    .line 5
    :goto_1
    :try_start_3
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    if-eqz v1, :cond_0

    goto :goto_0

    :catch_3
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    .line 6
    :goto_2
    invoke-virtual {v0}, Ljava/io/FileNotFoundException;->printStackTrace()V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    if-eqz v1, :cond_0

    goto :goto_0

    :catch_4
    :cond_0
    :goto_3
    return-void

    :catchall_1
    move-exception v0

    :goto_4
    if-eqz v1, :cond_1

    .line 7
    :try_start_4
    invoke-virtual {v1}, Ljava/io/ObjectOutputStream;->close()V
    :try_end_4
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_5

    .line 8
    :catch_5
    :cond_1
    goto :goto_6

    :goto_5
    throw v0

    :goto_6
    goto :goto_5
.end method

.method public static f()V
    .locals 2

    .line 1
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->m:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    sget-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->e:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;

    if-eqz v1, :cond_0

    .line 3
    sget-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->e:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;

    invoke-virtual {v1}, Lcom/estrongs/android/scanner/service/a;->b()V

    const/4 v1, 0x0

    .line 4
    sput-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->e:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$d;

    .line 5
    :cond_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public static g()V
    .locals 14

    .line 1
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->l:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    sget-boolean v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->j:Z

    if-eqz v1, :cond_0

    sget-boolean v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->k:Z

    if-eqz v1, :cond_0

    .line 3
    monitor-exit v0

    return-void

    .line 4
    :cond_0
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object v1

    invoke-virtual {v1}, Lcom/estrongs/android/pop/l;->J0()Z

    move-result v1

    if-nez v1, :cond_1

    .line 5
    new-instance v1, Ljava/io/File;

    sget-object v2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->a:Ljava/lang/String;

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/io/File;->delete()Z

    .line 6
    monitor-exit v0

    return-void

    .line 7
    :cond_1
    new-instance v1, Ljava/util/HashSet;

    invoke-direct {v1}, Ljava/util/HashSet;-><init>()V

    .line 8
    sget-boolean v2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->j:Z

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x1

    if-nez v2, :cond_6

    new-instance v2, Ljava/io/File;

    sget-object v6, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->a:Ljava/lang/String;

    invoke-direct {v2, v6}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_6

    .line 9
    sput-boolean v5, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->j:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_4

    .line 10
    :try_start_1
    new-instance v2, Ljava/io/FileInputStream;

    sget-object v6, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->a:Ljava/lang/String;

    invoke-direct {v2, v6}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V

    .line 11
    new-instance v6, Ljava/io/ObjectInputStream;

    invoke-direct {v6, v2}, Ljava/io/ObjectInputStream;-><init>(Ljava/io/InputStream;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 12
    :try_start_2
    new-instance v7, Ljava/util/ArrayList;

    invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V

    .line 13
    :goto_0
    invoke-virtual {v2}, Ljava/io/FileInputStream;->available()I

    move-result v8

    if-lez v8, :cond_2

    .line 14
    invoke-virtual {v6}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    .line 15
    invoke-interface {v7, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_2
    const/4 v2, 0x0

    .line 16
    :goto_1
    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v8

    if-ge v2, v8, :cond_4

    .line 17
    invoke-interface {v7, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    .line 18
    new-instance v9, Ljava/io/File;

    iget-object v10, v8, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->cachePath:Ljava/lang/String;

    invoke-direct {v9, v10}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 19
    invoke-virtual {v9}, Ljava/io/File;->lastModified()J

    move-result-wide v9

    iget-wide v11, v8, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->localFileLastModified:J

    cmp-long v13, v9, v11

    if-ltz v13, :cond_3

    .line 20
    invoke-static {v8}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->a(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;)V

    .line 21
    :cond_3
    iget-object v8, v8, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-interface {v1, v8}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    .line 22
    :cond_4
    :goto_2
    :try_start_3
    invoke-virtual {v6}, Ljava/io/ObjectInputStream;->close()V
    :try_end_3
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_4

    goto :goto_5

    :catch_0
    move-exception v2

    goto :goto_3

    :catchall_0
    move-exception v1

    goto :goto_4

    :catch_1
    move-exception v2

    move-object v6, v4

    .line 23
    :goto_3
    :try_start_4
    sput-boolean v3, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->j:Z

    .line 24
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_1

    if-eqz v6, :cond_6

    goto :goto_2

    :catchall_1
    move-exception v1

    move-object v4, v6

    :goto_4
    if-eqz v4, :cond_5

    .line 25
    :try_start_5
    invoke-virtual {v4}, Ljava/io/ObjectInputStream;->close()V
    :try_end_5
    .catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_2
    .catchall {:try_start_5 .. :try_end_5} :catchall_4

    .line 26
    :catch_2
    :cond_5
    :try_start_6
    throw v1

    .line 27
    :catch_3
    :cond_6
    :goto_5
    sget-boolean v2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->k:Z

    if-nez v2, :cond_b

    new-instance v2, Ljava/io/File;

    sget-object v6, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->b:Ljava/lang/String;

    invoke-direct {v2, v6}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_b

    .line 28
    sput-boolean v5, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->k:Z
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_4

    .line 29
    :try_start_7
    new-instance v2, Ljava/io/FileInputStream;

    sget-object v5, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->b:Ljava/lang/String;

    invoke-direct {v2, v5}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V

    .line 30
    new-instance v5, Ljava/io/ObjectInputStream;

    invoke-direct {v5, v2}, Ljava/io/ObjectInputStream;-><init>(Ljava/io/InputStream;)V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_5
    .catchall {:try_start_7 .. :try_end_7} :catchall_3

    .line 31
    :try_start_8
    invoke-virtual {v2}, Ljava/io/FileInputStream;->available()I

    move-result v2

    if-lez v2, :cond_7

    .line 32
    invoke-virtual {v5}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;

    move-result-object v2

    move-object v4, v2

    check-cast v4, Ljava/util/Map;

    .line 33
    :cond_7
    invoke-interface {v4}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_8
    :goto_6
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v6

    if-eqz v6, :cond_9

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/util/Map$Entry;

    .line 34
    invoke-interface {v6}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    .line 35
    new-instance v7, Ljava/io/File;

    iget-object v8, v6, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->cachePath:Ljava/lang/String;

    invoke-direct {v7, v8}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 36
    iget-object v8, v6, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-interface {v1, v8}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v8

    if-nez v8, :cond_8

    invoke-virtual {v7}, Ljava/io/File;->lastModified()J

    move-result-wide v7

    iget-wide v9, v6, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->localFileLastModified:J

    cmp-long v11, v7, v9

    if-lez v11, :cond_8

    .line 37
    invoke-static {v6}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->a(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;)V

    goto :goto_6

    .line 38
    :cond_9
    sget-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->c:Ljava/util/Map;

    invoke-interface {v1, v4}, Ljava/util/Map;->putAll(Ljava/util/Map;)V
    :try_end_8
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_4
    .catchall {:try_start_8 .. :try_end_8} :catchall_2

    .line 39
    :try_start_9
    invoke-virtual {v5}, Ljava/io/ObjectInputStream;->close()V
    :try_end_9
    .catch Ljava/io/IOException; {:try_start_9 .. :try_end_9} :catch_7
    .catchall {:try_start_9 .. :try_end_9} :catchall_4

    goto :goto_9

    :catchall_2
    move-exception v1

    move-object v4, v5

    goto :goto_8

    :catch_4
    move-exception v1

    move-object v4, v5

    goto :goto_7

    :catchall_3
    move-exception v1

    goto :goto_8

    :catch_5
    move-exception v1

    .line 40
    :goto_7
    :try_start_a
    sput-boolean v3, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->k:Z

    .line 41
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_a
    .catchall {:try_start_a .. :try_end_a} :catchall_3

    if-eqz v4, :cond_b

    .line 42
    :try_start_b
    invoke-virtual {v4}, Ljava/io/ObjectInputStream;->close()V
    :try_end_b
    .catch Ljava/io/IOException; {:try_start_b .. :try_end_b} :catch_7
    .catchall {:try_start_b .. :try_end_b} :catchall_4

    goto :goto_9

    :goto_8
    if-eqz v4, :cond_a

    :try_start_c
    invoke-virtual {v4}, Ljava/io/ObjectInputStream;->close()V
    :try_end_c
    .catch Ljava/io/IOException; {:try_start_c .. :try_end_c} :catch_6
    .catchall {:try_start_c .. :try_end_c} :catchall_4

    .line 43
    :catch_6
    :cond_a
    :try_start_d
    throw v1

    .line 44
    :catch_7
    :cond_b
    :goto_9
    monitor-exit v0

    return-void

    :catchall_4
    move-exception v1

    monitor-exit v0
    :try_end_d
    .catchall {:try_start_d .. :try_end_d} :catchall_4

    goto :goto_b

    :goto_a
    throw v1

    :goto_b
    goto :goto_a
.end method
